tools: remus: blktap2/block-remus.c - potential write-after-write race fix
authorShriram Rajagopalan <rshriram@cs.ubc.ca>
Thu, 26 May 2011 14:04:46 +0000 (15:04 +0100)
committerShriram Rajagopalan <rshriram@cs.ubc.ca>
Thu, 26 May 2011 14:04:46 +0000 (15:04 +0100)
commit315dfd4ec671f40029c58fd84ec9d095ea3cff7d
tree99733f7966249730c5e30dfcbdc62195ace4a183
parentb3f1e4ac567c2a03979a10991dd301d6c80b96e9
tools: remus: blktap2/block-remus.c - potential write-after-write race fix

At the end of a checkpoint, when a new flush (of buffered disk writes)
is merged with ongoing flush, we have to make sure that none of the new
disk I/O requests overlap with ones in in progress. If it does, hold the
request and dont issue I/O until the overlapping one finishes. If we allow
the I/O to proceed, we might end up with two overlapping requests in the
disk's queue and the disk may not offer any guarantee on which one is
written first.

Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/blktap2/drivers/block-remus.c